{{template "header" .}}	
<title>登录</title>
</head>
<body>
<!--<div class="container" style="margin:150px;width:500px">-->
<div class="container" style="margin-top:150px;width:500px">
	<form method="POST" action="/login">
		<div class="form-group">
			<label>用户</label>
			<input id="user" class="form-control" type="" name="UserName" placeholder="请输入用户名" >
		</div>
		<div class="form-group">
			<label>密码</label>
			<input id="pwd" class="form-control" type="password" name="PassWord" placeholder="请输入密码" >
		</div>
		<div class="checkbox">
			<label>
				<input type="checkbox" name="AutoLogin">自动登录
			</label>
		</div>
		<button class="btn-default" type="submit" onclick="return checkinput()">登录</button>
		<button class="btn-default" onclick="return backtohome()">返回</button>
	</form>
	<script type="text/javascript">
		function checkinput(){
			var name = document.getElementById("user");
			if (name.value.length == 0){
				alert("请输入用户");
				return false;
			}
			var pass = document.getElementById("pwd");
			if (pass.value.length == 0){
				alert("请输入密码");
				return false;
			}

			return true;
		}
		function backtohome(){
			window.location.href = "/";
			return false;
		}
	</script>
</div>
</body>
</html>
